<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>JQueryDom操作</title>
		<link rel="stylesheet" type="text/css" href="css/txt.css" />
		<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div>
			<div id="mydiv"></div>
		</div>

	</body>

	<script type="text/javascript">
		$(function() {
			// 请直接给元素div设置样式 宽200 高100  背景红色
			$(mydiv).css({width:"200px", height:"100px",background:"red"});
		});
	</script>

</html>